﻿using ChoMy.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ChoMy.Constants
{
    public class GlobalConstant
    {
        public static string AltGlobal()
        {
            if (HttpContext.Current.Session["AltGlobal"] == null)
            {
                ChoMyContext db = new ChoMyContext();

                HttpContext.Current.Session["AltGlobal"] = db.Settings.First(x => x.Name == "AltGlobal").Value;
            }

            return HttpContext.Current.Session["AltGlobal"] as String;
        }
    }
}